package com.weibotwo.service;

import com.weibotwo.common.Exception.UserServiceException;
import com.weibotwo.common.util.PageResult;
import com.weibotwo.pojo.Shell;
import com.weibotwo.pojo.User;

import java.util.Map;

/**
 * 用户操作服务层接口
 *  UserService
 * @author 天火
 * @date 2019-02-28
 * @version 1.0
 */
public interface UserService {

    //用户登陆
    User login(String userId,String password) throws UserServiceException;

    //查看用户自己的微博
    PageResult findWeiboListByUserId(Long userId,Integer pageNum, Integer pageSize, String action);

    //用户注册
    void register(User user);

    //更新用户信息
    void updateUser(User user);

    //根据用户id查询用户
    User findUserByID(Long uId);

    //查询用户未读私信
    Map<String, Object> alerts(Long uId);

    //根据邮箱查找用户
    User findUserByEmail(String eMail);

    //分页查询用户收藏的微博
    PageResult findCollectWeiboByUserId(Long uId,int pageNum);

    //贝壳模块
    Map<String, Object> shellIndex(User user,String operation ,Integer pageNum);

    //贝壳详细页面
    Map<String, Object> shellDetail(long conchId);

    //发布贝壳
    void publishShell(Shell shell);

    //采纳回答
    void adoptComm(long shellId, long commId);
}
